home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2001 May
/
SGI Freeware 2001 May - Disc 2.iso
/
dist
/
fw_nas.idb
/
etc
/
init.d
/
nas_server.z
/
nas_server
Wrap
Text File
|
2001-04-12
|
753b
|
48 lines
#!/bin/sh -f
#
# sample init.d script to start/stop Network Audio System server
#
#
SERVER=/usr/freeware/bin/nasd
CONFIG=/etc/config
IS_ON=/etc/chkconfig
SU="/bin/su guest -c"
if $IS_ON verbose
then
ECHO="/bin/echo"
else
ECHO=":"
fi
case "$1" in
'start')
if $IS_ON nas_server && test -x $SERVER; then
$ECHO "Network Audio System server\c"
#
# Run as as the user "guest" if possible
#
if $SU echo >/dev/null 2>&1; then
$ECHO " as guest\c"
$SU "exec $SERVER -aa" > /dev/null 2>&1 &
else
$ECHO " as root\c"
$SERVER -aa > /dev/null 2>&1 &
fi
$ECHO "."
fi
;;
'stop')
if test -x $SERVER; then
killall ausgi
$ECHO "Killed Network Audio System server"
fi
;;
*)
$ECHO "usage: $0 {start|stop}"
;;
esac